package com.leyou.item.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.leyou.item.entity.Brand;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BrandMapper extends BaseMapper<Brand> {
    @Select("SELECT *from tb_category_brand JOIN tb_brand \n" +
            "on tb_category_brand.brand_id=tb_brand.id\n" +
            "where tb_category_brand.category_id=#{id}")
    List<Brand>findById(@Param("id") Long cid);
}
